package com.amrit.revision;

public class A {
	public static void main(String[] args) throws MyException {
		A a = new B();
		B b = new B();
		// B b1 = (B) new A();
		a.m1();
		a.m2();
		a.m3();
		b.m1();
		b.m2();
		/*
		 * b1.m1(); b1.m2(); b1.m3();
		 */
		throw new MyException("custom exception thrown");

	}

	void m1() throws ClassNotFoundException {
		System.out.println("m1 of A");
	}

	void m2() {
		System.out.println("m2 of A");
	}

	protected void m3() {
		System.out.println("In private method");
	}

}
